﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_webcon_nav : System.Web.UI.UserControl
{
    public Administrator admin;
    protected void Page_Load(object sender, EventArgs e)
    {
        admin = Administrator.Check();
        if (admin == null)
        {
            Session.Add(Params.SystemError, "请先登录");
            Response.Redirect(Params.RootHttp + "default.aspx");
        }
        if (admin.Email == "" && !Fun.IsProfilePage()&&!Page.IsPostBack)
        {
            Fun.Redirect(Params.AdminFolderHttp + "profile.aspx", "请完整个人信息！");
        }
        string info = "共有个"+Team.Count().ToString()+"团队，"+Category.Count().ToString()+"个类别，导师"+Doctor.Count().ToString()+"位，专家"
            +Doctor.ExpertCount().ToString()+"位，学生"+Student.Count().ToString()+"名，已提交论文"+Student.PaperCount().ToString()+"篇，其中"+
            Student.SuspendCount().ToString()+"篇在审，"+Student.PastCount()+"篇通过，"+Student.FailCount()+"篇未通过。";
        this.PageHeader = info;
        int n = admin.NotReadYeatNum;
        if (n > 0)
        {
            this.hlRecv.Text = "收件箱（"+n.ToString()+"）";
            this.hlRecv.Font.Bold = true;
        }
    }

    public string Title
    {
        set
        {
            this.hTitle.InnerText = value;
        }
    }

    public string PageHeader
    {
        set
        {
            this.divHeader.InnerText = value;
        }
    }
}
